package cn.powerone.scm.domain;

import java.math.BigDecimal;
import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import cn.powerone.common.annotation.Excel;
import cn.powerone.common.core.domain.BaseEntity;

/**
 * 客户订单对象 scm_customer_orders
 * 
 * @author PowerOne
 * @date 2025-07-04
 */
@Setter
@Getter
public class ScmCustomerOrders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /**  */
    private Long id;

    /** 项目ID */
    @Excel(name = "项目ID")
    private Long projectId;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String orderCode;

    /** 订单日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "订单日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderDate;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private Long orderStatus;

    /** 订单类型 */
    @Excel(name = "订单类型")
    private Long orderType;

    /** 要求交期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "要求交期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date requestedDeliveryDate;

    /** 回复交期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "回复交期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date repliedDeliveryDate;

    /** 订单总金额 */
    @Excel(name = "订单总金额")
    private BigDecimal totalAmount;

    /** 已收款金额 */
    @Excel(name = "已收款金额")
    private BigDecimal receivedAmount;

    /** 发票金额 */
    @Excel(name = "发票金额")
    private BigDecimal invoiceAmount;

    /** 支付状态 */
    @Excel(name = "支付状态")
    private Long paymentStatus;

    /** 客户ID */
//    @Excel(name = "客户ID")
    private Long customerId;

    /** 甲方抬头 */
    @Excel(name = "甲方抬头")
    private String buyerTitle;

    /** 甲方地址 */
    @Excel(name = "甲方地址")
    private String buyerAddress;

    /** 甲方联系人 */
    @Excel(name = "甲方联系人")
    private String buyerPerson;

    /** 甲方电话 */
    @Excel(name = "甲方电话")
    private String buyerPhone;

    /** 甲方开户银行 */
    @Excel(name = "甲方开户银行")
    private String buyerAccountBank;

    /** 甲方银行账号 */
    @Excel(name = "甲方银行账号")
    private String buyerAccountNumber;

    /** 甲方签署日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "甲方签署日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date buyerSignDate;

    /** 乙方抬头 */
    @Excel(name = "乙方抬头")
    private String sellerTitle;

    /** 乙方地址 */
    @Excel(name = "乙方地址")
    private String sellerAddress;

    /** 乙方联系人 */
    @Excel(name = "乙方联系人")
    private String sellerPerson;

    /** 乙方电话 */
    @Excel(name = "乙方电话")
    private String sellerPhone;

    /** 乙方开户银行 */
    @Excel(name = "乙方开户银行")
    private String sellerAccountBank;

    /** 乙方银行账号 */
    @Excel(name = "乙方银行账号")
    private String sellerAccountNumber;

    /** 乙方签署日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "乙方签署日期", width = 30, dateFormat = "yyyy-MM-dd")
    private Date sellerSignDate;

    /** 合同文件名字 */
    @Excel(name = "合同文件名字")
    private String contractFileName;

    /** 合同文件路径 */
    @Excel(name = "合同文件路径")
    private String contractFile;

    /** 备注 */
    @Excel(name = "备注")
    private String remarks;

    /** 客户订单明细信息 */
    private List<ScmCustomerOrderItems> scmCustomerOrderItemsList;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("projectId", getProjectId())
            .append("orderCode", getOrderCode())
            .append("orderDate", getOrderDate())
            .append("requestedDeliveryDate", getRequestedDeliveryDate())
            .append("repliedDeliveryDate", getRepliedDeliveryDate())
            .append("totalAmount", getTotalAmount())
            .append("receivedAmount", getReceivedAmount())
            .append("invoiceAmount", getInvoiceAmount())
            .append("paymentStatus", getPaymentStatus())
            .append("buyerTitle", getBuyerTitle())
            .append("buyerAddress", getBuyerAddress())
            .append("buyerPerson", getBuyerPerson())
            .append("buyerPhone", getBuyerPhone())
            .append("buyerAccountBank", getBuyerAccountBank())
            .append("buyerAccountNumber", getBuyerAccountNumber())
            .append("buyerSignDate", getBuyerSignDate())
            .append("sellerTitle", getSellerTitle())
            .append("sellerAddress", getSellerAddress())
            .append("sellerPerson", getSellerPerson())
            .append("sellerPhone", getSellerPhone())
            .append("sellerAccountBank", getSellerAccountBank())
            .append("sellerAccountNumber", getSellerAccountNumber())
            .append("sellerSignDate", getSellerSignDate())
            .append("contractFileName", getContractFileName())
            .append("contractFile", getContractFile())
            .append("remarks", getRemarks())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("scmCustomerOrderItemsList", getScmCustomerOrderItemsList())
            .toString();
    }
}
